using Services;
using UnityEngine;

public class Cheater : MonoBehaviour
{
    private Clock clock;

    private void Start()
    {
        clock = ServiceLocator.Get<Clock>();
    }

    public void SetTimeScale(float timeScale)
    {
        Time.timeScale = timeScale;
    }

    public void SetTime(float hour)
    {
        int minute = (int)MyDateTime.ToMinute(0, (decimal)(hour - clock.DateTime.HourOfDay));
        clock.Time += minute / Clock.TimeToMinute;
    }
}
